<? include_once("../../../common/common_setting_unit.php"); //引入通用的设置文件?>
<? include_once("../controller/detail-list.php");
?>



<?

//获取本页用到的单位的名字
$unit_nid_list=transform_2darray_in_1darray_with_new_key($detail,"nid","unit");
$unit_nid_list_str=implode("','",$unit_nid_list);
$unit_list=select_lines_all_items($table_Prefix."unit","","nid in ('".$unit_nid_list_str."')","");
$unit_name_list=transform_2darray_in_1darray_with_new_key($unit_list,"nid","sname");

?>
 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
   <?php include ROOT_PATH_.'/controller/common/module/head.php'; ?>
    <?php include 'module/head.php'; ?>
</head>

<body>

<div id="topbar">   <?php include ROOT_PATH_.'/controller/common/module/topbar.php'; ?></div>

<div id="container" class="<? echo $system_part ?>">

    <div id="maincontent">

        <div id="sidebar">
            <?php include ROOT_PATH_.'/controller/common/module/sidebar.php'; ?>
        </div>




<div id="content">
<h1> 项目列表 </h1>





<div class="select-box layui-form">
<form action="detail-list.php" >

    <div class="layui-form-item">
        <label class="layui-form-label">关键词</label>
        <div class="layui-input-block">
            <input type="text" name="select_keywords" placeholder="项目名称 | 单位名称" autocomplete="off" class="layui-input" value="<? echo $_REQUEST['select_keywords']?>" >
        </div>
    </div>




    <div class="layui-form-item">
        <label class="layui-form-label">时间</label>

        <div class="layui-input-block">
            <input type="text" name="select_startday" placeholder="请输入开始时间" autocomplete="off" class="layui-input"  onclick="laydate({istime: true, format: 'YYYY-MM-DD'})" style="float: left; width: 112px" value="<?if($_REQUEST['select_startday']){echo $_REQUEST['select_startday'] ;} ?>" >

            <span style="float: left;margin: 0 4px; line-height: 30px;">-</span>


            <input type="text" name="select_endday" placeholder="请输入结束时间" autocomplete="off" class="layui-input" onclick="laydate({istime: true, format: 'YYYY-MM-DD'})"  style="float: left; width:112px" value="<?if($_REQUEST['select_endday']){echo $_REQUEST['select_endday'] ;} ?>"  >


            <input type="hidden" name="nav-itemed"  value="case" >


        </div>


    </div>





    <div class="layui-form-item">
        <label class="layui-form-label">状态</label>
        <div class="layui-input-block">
            <select name="select_status">
                <?if($_REQUEST['select_status']){echo "<option value='".$_REQUEST['select_status']."'>".$_REQUEST['select_status']."</option>";}?>






                <option value="全部">全部</option>
                <option value="完成">完成</option>
                <option value="进行中">进行中</option>
                <option value="自然流失">自然流失</option>
                <option value="我放终止">我放终止</option>
                <option value="客户终止">客户终止</option>
                <option value="其他">其他</option>
                <option value="询价中">询价中</option>

            </select>
        </div>
    </div>







    <button class="layui-btn" ><i class="layui-icon">&#xe615;</i> 查找</button>
    <a class="layui-btn" href="<?echo $domain?>/controlbase/unit/detail-list-unit.php?nav-itemed=unit" ><i class="layui-icon">&#x1006;</i> 重置</a>

    <br class="clearfloat"/>
</form>

    <br class="clearfloat"/>
</div>












<!-- 用$system_part .list_boxes来控制来到确认板块信息显示-->
    <!-- 用$system_part .list_boxes来控制来到确认板块信息显示-->
<div class="list-box">

<div class="list-boxes layui-form">


<table class="layui-table">
  <colgroup>
    <col width="80">
    <col width="300">
	<col width="100">
	<col > 
	<col >
      <col width="280">


  </colgroup>
  <thead>
    <tr>
      <th>序号</th>
      <th>名称</th>
      <th>状态</th>
      <th>开始时间-结束时间</th>
      <th>报价人数</th>
      <th>操作</th>

    </tr> 
  </thead>
  <tbody>





<?php
for ($i = 0; $i < $detailnum; $i++) {
?>




<tr id="item<?echo $detail[$i]['nid']?>" <?if($applymodify['nid']){echo "style='color:red'";$status="审核中";}else{$status="正常";}?>>


<td><?echo $i+1+$plate['page_list_num']*($nowpageid-1) ?></td>
<td>
    <a href="../../unit/view/detail-statistic.php?sys_part=unit&nid=<?echo $detail[$i]['nid']?>">
        <?echo $detail[$i]['name']?>
    </a>
</td>

<td><span  <?if($detail[$i]['status']=='进行中'){echo "class='layui-badge'  style='background-color:#ff9900'";}?>> <?echo $detail[$i]['status']?></span></td>

<td><?echo substr($detail[$i]['startdate'],0,10)?> - <?echo substr($detail[$i]['enddate'],0,10)?>
    <span class="layui-badge layui-bg-green"><?echo count_days($detail[$i]['startdate'],$detail[$i]['enddate'])?>日</span>
</td>



<!--    用count by iem 去统计多少企业报价-->
<td><?echo $detail[$i]['sum']?></td>











    <td>


<a href="detail-info-quotation.php?&nid=<? echo $detail[$i]['nid']?>
<?echo $pagenumber_url.$sortby_url.$navitemed_url.$system_part ?><?echo $url_str?>"
   class="layui-btn  layui-btn-sm" target="_blank" ><i class="layui-icon">&#xe621;</i>报价</a>






  </td>
    </tr>
<?}?>

 
  </tbody>
</table>




 

</div>


<div class="list-box-function"
<? if ($detailnum == 0) {
    echo "style" . "='display:none'";
} ?>
>

    <?php include 'page_numbers.php'; ?>

</div>




<!--list-box end-->
</div>

<!--content端點01-->
</div>
<!--maincontent端點01-->
<br class="clearfloat"/>
</div>
<!--container端點01-->
</div>








<?php include ROOT_PATH_ . "/controller/common/module/footer.php"; ?> </body>
</html>